/* 主页 */
.home {
    height: 100vh;
    width: 100vw;
    min-width: 1280px;
    min-height: 720px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    border-radius: .5rem;
    overflow: hidden;
    color: var(--color-text);
    background-color: var(--color-background);
    transition: background-color 0.5s;

    &::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        backdrop-filter: blur(10px);
    }
}


.home-mobile {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    color: var(--color-text);
    background-color: var(--color-background);
    transition: background-color 0.5s;
}

.video-or-audio-notify {
    position: fixed;
    width: 0;
    height: 0;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: .5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: video-notify-spawn .2s forwards;
    background-color: white;
    padding-left: 1rem;
    padding-right: 1rem;
    z-index: 3;

    img {
        width: 2rem;
        height: 2rem;
        border-radius: .2rem;
    }

    .video-audio-notify-operate {
        display: flex;
        gap: 1rem;

        > :first-child {
            background-color: red;
        }

        > :nth-child(2) {
            background-color: #95EC69;
        }

        span {
            cursor: pointer;
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;

            svg path {
                fill: white;
                stroke: white;
            }
        }
    }
}

.phone-call-size {
    width: 0;
    height: 0;
    left: 50%;
    transform: translateX(-50%);
    top: 1rem;
    border-radius: .5rem;
    animation: video-spawn .2s forwards;
}

.phone-call-size-mobile {
    width: 100%;
    height: 100%;
    left: 0;
    top: -100%;
    animation: video-spawn-mobile .2s forwards;
}

.zoom-call-icon {
    width: 2rem;
    height: 2rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    cursor: pointer;

    svg {
        width: 100%;
        height: 100%;
    }

}

.zoom-call {
    width: 5rem;
    height: 5rem;
    border-radius: .3rem;
    overflow: hidden;

    .call-operate {
        display: none;
    }

    .zoom-call-icon {
        display: none;
    }

    &:hover {

        .zoom-call-icon {
            display: flex;
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            justify-content: center;
            align-items: center;
            background-color: rgba(0, 0, 0, .2);
            z-index: 100;

            span {
                cursor: pointer;
                width: 2rem;
                height: 2rem;

                svg {
                    width: 100%;
                    height: 100%;
                }
            }
        }
    }
}



.video-container {
    position: fixed;
    background-color: white;
    z-index: 20;
    overflow: hidden;

    .video-self {
        width: 100%;
        height: auto;
        position: absolute;
        bottom: 0;
        right: 0;
        border-radius: .2rem;
        z-index: 2;
    }

    .video-friend {
        position: absolute;
        width: 100%;
        height: auto;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
    }

}

.audio-container {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    /* 居中 */
    background-position: center;
    /* 铺满 */
    background-size: cover;
    /* 保持图片不重复 */
    background-repeat: no-repeat;
    z-index: 3;

    .audio-avatar {
        width: 50%;
        /*保持宽高比为1:1*/
        aspect-ratio: 1 / 1;
        border-radius: .3rem;
        z-index: 1;
    }

    &::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        backdrop-filter: blur(10px);
    }
}

.call-duration {
    position: absolute;
    bottom: 4rem;
    width: 100%;
    text-align: center;
}

.call-duration-zoom {
    position: absolute;
    bottom: 0;
    width: 100%;
    font-size: small;
    text-align: center;
}

.call-operate {
    position: absolute;
    width: 100%;
    height: 3.5rem;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    z-index: 3;

    background-color: rgba(0, 0, 0, .2);

    span {
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;

    }

    .switch-microphone {
        background-color: white;

        svg {
            width: 2rem;
            height: 2rem;
        }
    }

    .hangup-icon {
        background-color: red;

        svg {
            width: 2rem;
            height: 2rem;

            path {
                fill: white;
                stroke: white;
            }
        }
    }

    .call-volume {
        background-color: white;

        svg {
            width: 2rem;
            height: 2rem;
        }
    }
}


.notify {
    position: absolute;
    top: 2rem;
    right: 1rem;
    width: 10rem;
    max-height: 11rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    z-index: 10;

    .error {
        background-color: #f8d7da;
        color: #721c24;

        svg path {
            fill: aliceblue;
            stroke: aliceblue;
        }
    }

    .notification-item {
        width: 100%;
        min-height: 2rem;
        max-height: 4rem;
        position: relative;
        border-radius: .3rem;
        padding: .3rem;
        overflow: hidden;
        flex-shrink: 0;

        .notification-close {
            position: absolute;
            top: 0;
            right: 0;
            width: 1rem;
            height: 1rem;
            cursor: pointer;
        }
    }
}

@keyframes video-spawn {
    to {
        width: 22.5rem;
        height: 30rem;
    }
}

@keyframes video-spawn-mobile {
    from {
        top: -100%;
    }

    to {
        top: 0;
    }
}

@keyframes video-notify-spawn {
    to {
        width: 20rem;
        height: 3rem;
        top: .5rem;
    }
}

@keyframes video-self-zoom-in {
    to {
        width: 50%;
    }
}
